/*
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

class Rectangle implements Comparable<Rectangle>{
    int l;
    int h;

    public Rectangle(int l, int h) {
        this.l = l;
        this.h = h;
    }

    public int getArea(){
        return l*h;
    }

    public int compareTo(Rectangle o){
        return this.getArea()-o.getArea();
    }

    public String toString(){
        return l+","+h;
    }
}

class MyCompare implements Comparator<Rectangle>{
    public int compare(Rectangle r1,Rectangle r2){
        return r1.getArea()-r2.getArea();
    }
}

public class Main3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Rectangle[] arr = new Rectangle[5];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = new Rectangle(sc.nextInt(), sc.nextInt());// 输入矩形的长和宽
        }
        MyCompare mc = new MyCompare();  //提示：要实现Comparator接口
        Arrays.sort(arr, mc);

        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i] + "->" + arr[i].getArea());
        }
        sc.close();

    }
}
 */
